using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class opertbl1Map : EntityTypeConfiguration<opertbl1>
    {
        public opertbl1Map()
        {
            // Primary Key
            this.HasKey(t => t.Id);

            // Properties
            this.Property(t => t.Item_id)
                .IsRequired()
                .HasMaxLength(10);

            this.Property(t => t.Desc)
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("opertbl1");
            this.Property(t => t.Id).HasColumnName("Id");
            this.Property(t => t.Item_id).HasColumnName("Item_id");
            this.Property(t => t.Qty).HasColumnName("Qty");
            this.Property(t => t.AdmisionId).HasColumnName("AdmisionId");
            this.Property(t => t.Desc).HasColumnName("Desc");
            this.Property(t => t.date).HasColumnName("date");
            this.Property(t => t.Physician_id).HasColumnName("Physician_id");
        }
    }
}
